package com.nova;

import com.nova.source.R;
import com.nova.view.DatePickerDialog;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends BaseActivity
{

	private StringBuffer sb;
	private TextView tv_date;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		sb = new StringBuffer();
		
		tv_date = (TextView) findViewById(R.id.tv_date);

		Button bt_date = (Button) findViewById(R.id.bt_date);
		bt_date.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v)
			{
				DatePickerDialog dateDialog = new DatePickerDialog(
						MainActivity.this, tv_date, sb);
				dateDialog.showDatePicker();
			}
		});
		
		Button bt_time = (Button) findViewById(R.id.bt_time);
		bt_time.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v)
			{

//				TimePickerDialog timeDialog = new TimePickerDialog(MainActivity.this);
//				timeDialog.showTimePicker(tv_date,sb);
				
				
			//	NovaToast.showLongToast(MainActivity.this, "天上的星星不说话");
				
				Toast.makeText(MainActivity.this, "天上的星星不说话", Toast.LENGTH_LONG).show();
			}
		});
	}

}
